﻿@{
    Layout = null;
}

<!DOCTYPE html>
<html>




<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>雪票购买_我要滑雪网</title>
    <meta name="description" content="雪票购买" />
    <meta name="keywords" content="雪票购买" />
    <meta name="robots" content="all" />
    <link href="~/Css/xpshopping_style.css" style="text/css" rel="stylesheet" />
    <link href="~/Css/style_zc.css" style="text/css" rel="stylesheet" />
    <link href="~/Css/public.css" style="text/css" rel="stylesheet" />
    <link href="~/Css/about.css" style="text/css" rel="stylesheet" />
    <script src="~/Js/jqueryhelp.js"></script>
    <script type="text/javascript" src="~/Js/tab.js"></script>
    <script src="~/Js/common.js" language="javascript"></script>

</head>
<base target="_self" />
<body>

    <div class="header">
        <div class="welcome">51SKI.COM 欢迎您</div>
    </div>
    <div class="wrap_zong">
        <div class="top">
            <div class="logo"><a href="/Home/Index" target="_self"><img src="http://img.51ski.com/images/logo-x.png" /></a></div>
            <div class="search">

                <form id="searchform" name="searchform" onsubmit="newsearch()">
                    <p class="p3">
                        <span class="jiaocheng_dj">雪场</span>
                        <input type="text" name="key" value="请输入雪场关键词" id="searchkey" />            <input type="submit" value="" class="submit" />
                    </p>
                    <div class="xiaxuan">
                        <span class="xuechang">雪场</span>
                        <span class="zixun">资讯</span>
                    </div>
                </form>


                <p class="p2"><span>|</span><a href="javascript:void(0)" class="shouji">手机版</a></p>

                <p class="p1"><span id="usernamespan" style="display:none"><a id="userName" href="/Home/Snow_Users"></a></span></p>


                <p class="p1"><a href="/Home/Snow_Users_Register">注册</a><span>|</span><a id="logoutspan" href="/Home/Snow_Users"><b class="color_red">登录</b></a></p>



                <p class="p4">
                    <a href="#">教学课程</a><a href="#">戏雪</a><a href="#">滑雪</a><a href="#">单板</a><a href="#">雪票预订</a>
                </p>

            </div>
            <ul class="nav">
                <li><a href="/Home/Snow_Map">雪场地图</a></li>
                <li><a href="/Home/News_Information">新闻资讯</a></li>
                <li><a href="/Home/Snow_Activity">雪场活动</a></li>
                <li><a href="/Home/Snow_Ticket">雪票预订</a></li>
                <li><a href="/Home/Snow_Course">滑雪教程</a></li>
                <li><a href="/Home/Snow_Video">酷炫视频</a></li>
                <li><a href="/Home/Snow_Users">用户中心</a></li>
            </ul>
        </div>
        <link rel="stylesheet" type="text/css" href="~/Css/jquery-ui.min.css">
        <script src="~/Js/jsondata.js"></script>
        <script src="~/Js/auth.js"></script>
        <script src="~/Js/newsearch.js">
        </script>
        <script src="~/Js/jquery-ui.min.js"></script>
        <script>
login();
var keyval = "雪场";
$(".xiaxuan").find("span").click(function(){
   keyval=$(this).html();
   if(keyval=="资讯"){
      $("#searchkey").val("请输入搜索内容");
   }else{
      $("#searchkey").val("请输入雪场关键词");
   }
});
    $("#searchkey").autocomplete({

	// 静态的数据源
    source: htmllist,
	select: function(event, ui){
		// event参数是事件对象
		$("#searchkey").val( ui.item.label);
		// 必须阻止默认行为，因为autocomplete默认会把ui.item.value设为输入框的value值
		event.preventDefault();
	}
	});
        </script>
        <div class="bannerBox">
            <script type="text/javascript" src="~/Js/WdatePicker.js"></script>
            <script>
var request ={QueryString : function(val){
var uri = window.location.search;var re = new RegExp("" +val+ "=([^&?]*)", "ig");
return ((uri.match(re))?(uri.match(re)[0].substr(val.length+1)):null);
}
}
var packid;
try{
packid=request.QueryString("packid");
if(packid == null){
	packid = "101";
	}
//alert(packid);
getData("http://admin.51ski.com/api/snowpack/getNews.do", {
						"id": packid
					}, function(result) {

	                             $.each(result.rows, function(i, item) {
					    $("h5").text(item.pack_name+"雪票预定")

			             });

					});
}catch(e){
}

var meal_type="1";




$(function(){
		var number_j=0;
                getMeal();
		$(".jia_sl").click(function(){
				number_j =$(".number_sl").val();
				number_j++;
				$(".number_sl").val(number_j);
		})
		$(".jian_sl").click(function(){
				number_j =$(".number_sl").val();
				if(number_j>0)
				 	number_j--;
				$(".number_sl").val(number_j);
		})
		if(packid=="101"||packid=="109"||packid=="173"||packid=="215"){

		}else{
			$(".btn_a a").text("即将开放");
			$(".btn_a a").attr("disabled", true);
			$(".btn_a a").attr("onclick", "");
		}

	});
function setmeal(){
//alert($("#d122_1").val());
	var week = $("#d122_1").val();
	if(week=="0"||week=="6"){
		$("#meal_type").text("周末套餐");
		meal_type="2";
	}else{
$("#meal_type").attr("class","1");
		$("#meal_type").text("平日套餐");
		meal_type="1";
	}
}
function getMeal(){
//alert(meal_type);
$("#meallist li").remove();
getData("http://admin.51ski.com/api/SetMeal/getMeal.do", {
						"packid": packid,"meal_type":4,"state":1
					}, function(result) {
$("del").text(result.rows[0].orig_price);
						$("strong").text(result.rows[0].price);
$.each(result.rows, function(i, item) {
	if(item!=null||item!=""){
		if(item.datestrs!=null||item.datestrs!=""){
						var datelist = item.datestrs.split(",");
						$.each(datelist, function(i, item1){
						    //   var id=item.id;
						    if(item1==$("#use_date").val()){
						$("#about_meal").text(item.items);
						$("#meallist").append("<li id='"+item.id+"' price='"+item.price+"' orig_price='"+item.orig_price+"' items='"+item.items+"' onclick='check_meal(this)'>"+"<span>"+"套餐"+(i+1)+"："+item.name+"</span>"+"</li>")
					}
				})
					}
					}
				});
					});
	getData("http://admin.51ski.com/api/SetMeal/getMeal.do", {
						"packid": packid,"meal_type":meal_type,"state":1
					}, function(result) {

$("del").text(result.rows[0].orig_price);
						$("strong").text(result.rows[0].price);
$.each(result.rows, function(i, item) {
						    //   var id=item.id;

$("#about_meal").text(item.items);							 $("#meallist").append("<li id='"+item.id+"' price='"+item.price+"' orig_price='"+item.orig_price+"' items='"+item.items+"' onclick='check_meal(this)'>"+"<span>"+"套餐"+(i+1)+"："+item.name+"</span>"+"</li>")
						});						});
getData("http://admin.51ski.com/api/SetMeal/getMeal.do", {
						"packid": packid,"meal_type":3,"state":1
					}, function(result) {

$("del").text(result.rows[0].orig_price);
						$("strong").text(result.rows[0].price);
$.each(result.rows, function(i, item) {
						    //   var id=item.id;

$("#about_meal").text(item.items);							 $("#meallist").append("<li id='"+item.id+"' price='"+item.price+"' orig_price='"+item.orig_price+"' items='"+item.items+"' onclick='check_meal(this)'>"+"<span>"+"套餐"+(i+1)+"："+item.name+"</span>"+"</li>")
						});						});
					};

var id = "";
function check_meal(ev){

$(ev).siblings().removeClass("active");
$(ev).addClass("active");
id = $(ev).attr("id");
var price = $(ev).attr("price");
var orig_price = $(ev).attr("orig_price");
var items = $(ev).attr("items");
//alert(items);
$("del").text(orig_price);
$("strong").text(price);
$("#about_meal").text(items);
};
function topay(){
	// alert(1);
var number=$("#number").val();
var use_date=$("#use_date").val();
if(use_date==null||use_date==""){
alert("请选择日期！");
return false;
}
if(number==""||number==null||number=="0"){
alert("请选择购买数量！");
return false;
}
if(id==""){
alert("请选择套餐！");
return false;
}

//alert(number);
	top.location.href = "http://www.51ski.com/xptj/?id="+id+"&number="+number+"&use_date="+use_date+"&packid="+packid ;
}
            </script>
            <div class="shopping_section">
                <p class="zf_p1"><a href="http://www.51ski.com/">首页</a><span class="active">&gt;</span><a href="http://www.51ski.com/skiresort/">雪场地图</a><span>&gt;</span><a href="javascript:void(0)">雪票预订</a></p>
                <div class="shopping_content">
                    <h5>数据加载中...</h5>
                    <div class="jiage_shijian_shuliang">
                        <ul class="piaojia">
                            <li>
                                <p><span>价格：</span>￥<del>0.00</del></p>
                                <p><span>价格：</span><i>￥</i><strong>0.00</strong><b>限时促销</b></p>
                            </li>


                        </ul>

                        <div class="riqi_shuliang">
                            <span>使用日期：</span><span><input class="Wdate" id="use_date" type="text" onclick="WdatePicker({minDate:'%y-%M-#{%d}',isShowWeek:true,onpicked:function() {$dp.$('d122_1').value=$dp.cal.getP('w','w');setmeal();getMeal();}})"><input id="d122_1" style="display:none" /></span>
                            <div class="shuliang"><span>数量：</span><input id="number" value="1" type="text" class="number_sl"><div class="jia_jian"><a class="a_shang_bg jia_sl" href="javascript:void(0)" target="_self"></a><a href="javascript:void(0);" class="jian_sl" target="_self"></a></div><small>张</small></div>
                        </div>
                    </div>
                    <div class="taocan_xuanze"><h4>套餐选择</h4><p>票务产品经理为您精心挑选</p></div>
                    <ul class="taocan_fenlei">
                        <li id="meal">
                            <h6 id="meal_type">平日套餐</h6>
                            <ul id="meallist"></ul>
                        </li>
                    </ul>
                    <style>
                        .about_meal_wrap {
                            position: relative;
                        }

                        .about_meal_content {
                            width: 296px;
                            padding-top: 56px;
                            background: url("http://img.51ski.com/images/about_meal_content_bg.png") no-repeat center bottom #fffde7;
                        }

                        .about_meal_wrap p {
                            color: #000;
                            font-size: 14px;
                            line-height: 23px;
                            font-family: "微软雅黑";
                            background: url("http://img.51ski.com/images/wenxin_prompt_p_bg.gif") no-repeat 0px 7px;
                            padding-left: 23px;
                            margin-bottom: 20px;
                        }

                        .about_meal_wrap h4 img {
                            position: absolute;
                            top: 7px;
                            left: -14px;
                        }
                    </style>
                    <div class="about_meal_wrap">
                        <div class="about_meal_content">
                            <h4><img src="http://img.51ski.com/images/wenxin_prompt.png" /></h4>
                            <p id="about_meal">

                            </p>
                        </div>
                    </div>
                    <p class="btn_a"><a onclick="topay()">立即购买</a></p>
                    <p class="goumai_xuzhi">购买须知</p>
                    <table border="0" cellspacing="1" cellpadding="0" class="xuzhi_xiangqing">
                        <tr>
                            <td class="td1">使用日期</td>
                            <td><p>使用日期以购票时选择的时间为准，其他时间使用需要登录账号改签。在元旦、春节使用时，请购买节日票。</p></td>
                        </tr>
                        <tr>
                            <td class="td1">预约提醒</td>
                            <td><p>购买雪票后请当天使用，部分雪场需要提前预约。（高峰期间消费可能需要排号等位）</p></td>
                        </tr>
                        <tr>
                            <td class="td1">限购限用提醒</td>
                            <td>
                                <p>每个账号可以购买多张雪票，能多人使用。</p>
                                <p>购买雪票不能兑现，也不能找零。</p>
                            </td>
                        </tr>
                        <tr>
                            <td class="td1">温馨提示</td>
                            <td>
                                <p><b>本单为电子兑换劵，购买后凭短信校验码在雪场直接使用，因为是不记名兑换券，所以请避免丢失。</b></p>

                                <p>本单不适宜心脏病、高血压及医生告知不适宜剧烈运动的疾病患者使用。</p>
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
        <div class="zx_footer">

            <ul>
                <li>
                    <img src="http://img.51ski.com/images/weibo_tuo1.png" />
                    <input type="button" value="进入官方微博" onclick="window.open('http://weibo.com/51ski/profile?s=6cm7D0')" />
                </li>
                <li>
                    <img src="http://img.51ski.com/images/weixin_tuo1.png" />
                    <input type="button" value="扫一扫立即注册" />
                </li>
            </ul>
            <div class="erweima">
                <img src="http://img.51ski.com/images/erweima.png" />
            </div>
            <div class="foot_con">
                <p><a href="http://www.51ski.com/aboutus/">关于我们</a><span>|</span><a href="http://www.51ski.com/law/">法律声明</a><span>|</span><a href="http://www.51ski.com/joinus/">加入我们</a><span>|</span><a href="http://www.51ski.com/coop/">合作雪场</a><span>|</span><a href="http://www.51ski.com/connection/">联系我们</a></p>
                <p>&copy;Copyright    1996-2014 51SKI  Corporation, All Rights Reserved</p>
                <p><a href="http://www.miitbeian.gov.cn/publish/query/indexFirst.action">51SKI 京公网安备11010102001739号/京ICP备15016851号-4</a></p>
                <p>我要滑雪网   版权所有 </p>
            </div>

        </div>
        <script type="text/javascript">
try{
var _ourplusPageurl = top.location.href;
}catch(e)
{
var _ourplusPageurl = location.href;
}
document.getElementById("logoutspan").href = "http://www.51ski.com/login/index.html?reurl=" + _ourplusPageurl;
        </script>
        <script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "//hm.baidu.com/hm.js?3bbc0e16ff36039bc4d0e85091a39c71";
  var s = document.getElementsByTagName("script")[0];
  s.parentNode.insertBefore(hm, s);
})();
        </script>

    </div>
</body>

</html>
